﻿using AngleSharp.Dom;
using AngleSharp.Dom.Html;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Abot.Demo.CNBlogs
{
    //日期	天气状况	气温	风力风向
    public class WeatherItem
    {
        public string Date;
        public string Weather; //大雨 /小到中雨	【to do 后续数据挖掘，统计规律】
        public string Temperature;//28℃ / 20℃【to do 后续数据挖掘，最低、最高】
        public string Wind;

        public string this[int index]
        {
            get
            {
                switch (index)
                {
                    case 1:
                        return Date;
                    case 2:
                        return Weather;
                    case 3:
                        return Temperature;
                    case 4:
                        return Wind;
                    default: return "";


                }
            }
            set
            {
                switch (index)
                {
                    case 1:
                        Date = value;
                        break;
                    case 2:
                        Weather = value;
                        break;
                    case 3:
                        Temperature = value;
                        break;
                    case 4:
                        Wind = value;
                        break;
                    default:
                        break;
                }
            }
        }

        public override string ToString()
        {
            return string.Format("{0}\t{1}\t{2}\t{3}\n", Date, Weather, Temperature, Wind);
        }
    }
}
